<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电商运营后台</title>
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4cc9f0;
            --success-color: #4ade80;
            --warning-color: #facc15;
            --danger-color: #f87171;
            --light-gray: #f8f9fa;
            --gray: #e9ecef;
            --dark-gray: #6c757d;
            --text-dark: #212529;
            --text-light: #f8f9fa;
            --border-radius: 8px;
            --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #ffffff;
            color: var(--text-dark);
            line-height: 1.6;
        }

        /* 顶部导航 */
        .navbar {
            background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
            color: white;
            padding: 0 20px;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: var(--box-shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .logo-icon {
            background: white;
            color: var(--primary-color);
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        .nav-links {
            display: flex;
            gap: 30px;
        }

        .nav-links a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            padding: 8px 12px;
            border-radius: 4px;
            transition: var(--transition);
        }

        .nav-links a:hover, .nav-links a.active {
            background: rgba(255, 255, 255, 0.2);
        }

        .user-actions {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .notification {
            position: relative;
            cursor: pointer;
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 0.7rem;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }

        /* 主内容区域 */
        .container {
            display: flex;
            min-height: calc(100vh - 70px);
        }

        /* 侧边栏 */
        .sidebar {
            width: 250px;
            background: white;
            padding: 20px 0;
            border-right: 1px solid var(--gray);
            height: calc(100vh - 70px);
            position: sticky;
            top: 70px;
        }

        .sidebar-menu {
            list-style: none;
        }

        .sidebar-menu li {
            padding: 12px 20px;
            margin: 5px 0;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .sidebar-menu li:hover, .sidebar-menu li.active {
            background: var(--light-gray);
            border-left: 4px solid var(--primary-color);
        }

        .sidebar-menu li i {
            width: 20px;
            text-align: center;
        }

        /* 主内容 */
        .main-content {
            flex: 1;
            padding: 30px;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .page-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--text-dark);
        }

        .btn {
            padding: 10px 20px;
            border-radius: var(--border-radius);
            border: none;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: var(--secondary-color);
        }

        /* 统计卡片 */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            border-radius: var(--border-radius);
            padding: 20px;
            box-shadow: var(--box-shadow);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .stat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        .icon-orders {
            background: rgba(67, 97, 238, 0.1);
            color: var(--primary-color);
        }

        .icon-revenue {
            background: rgba(76, 201, 240, 0.1);
            color: var(--accent-color);
        }

        .icon-customers {
            background: rgba(74, 222, 128, 0.1);
            color: var(--success-color);
        }

        .icon-growth {
            background: rgba(250, 204, 21, 0.1);
            color: var(--warning-color);
        }

        .stat-value {
            font-size: 1.8rem;
            font-weight: 700;
        }

        .stat-title {
            color: var(--dark-gray);
            font-size: 0.9rem;
        }

        .stat-change {
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .change-positive {
            color: var(--success-color);
        }

        .change-negative {
            color: var(--danger-color);
        }

        /* 订单卡片流 */
        .section-title {
            font-size: 1.4rem;
            font-weight: 600;
            margin: 30px 0 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--gray);
        }

        .orders-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .order-card {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            overflow: hidden;
            transition: var(--transition);
        }

        .order-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }

        .order-header {
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--gray);
        }

        .order-id {
            font-weight: 600;
            color: var(--primary-color);
        }

        .order-status {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .status-pending {
            background: rgba(250, 204, 21, 0.2);
            color: #92400e;
        }

        .status-processing {
            background: rgba(67, 97, 238, 0.2);
            color: var(--primary-color);
        }

        .status-shipped {
            background: rgba(74, 222, 128, 0.2);
            color: #166534;
        }

        .order-body {
            padding: 20px;
        }

        .order-customer {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 15px;
        }

        .customer-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-color);
            font-weight: bold;
        }

        .customer-info h4 {
            font-size: 1rem;
            margin-bottom: 2px;
        }

        .customer-info p {
            font-size: 0.85rem;
            color: var(--dark-gray);
        }

        .order-items {
            margin: 15px 0;
        }

        .item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px dashed var(--gray);
        }

        .item:last-child {
            border-bottom: none;
        }

        .item-name {
            font-size: 0.9rem;
        }

        .item-price {
            font-weight: 500;
        }

        .order-footer {
            padding: 15px 20px;
            background: var(--light-gray);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .order-total {
            font-weight: 700;
            font-size: 1.1rem;
        }

        .order-actions {
            display: flex;
            gap: 10px;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 0.85rem;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--gray);
        }

        /* 商品管理 */
        .products-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 20px;
        }

        .product-card {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            overflow: hidden;
            transition: var(--transition);
        }

        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }

        .product-image {
            height: 180px;
            background: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .product-info {
            padding: 15px;
        }

        .product-category {
            font-size: 0.8rem;
            color: var(--dark-gray);
            margin-bottom: 5px;
        }

        .product-name {
            font-weight: 600;
            margin-bottom: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-price {
            font-weight: 700;
            font-size: 1.2rem;
            margin-bottom: 15px;
        }

        .product-actions {
            display: flex;
            justify-content: space-between;
        }

        .product-stock {
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .stock-low {
            color: var(--danger-color);
        }

        .stock-normal {
            color: var(--success-color);
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .sidebar {
                width: 70px;
            }
            
            .sidebar-menu li span {
                display: none;
            }
            
            .sidebar-menu li {
                justify-content: center;
            }
        }

        @media (max-width: 768px) {
            .container {
                flex-direction: column;
            }
            
            .sidebar {
                width: 100%;
                height: auto;
                position: relative;
                top: 0;
                border-right: none;
                border-bottom: 1px solid var(--gray);
            }
            
            .nav-links {
                display: none;
            }
            
            .stats-container {
                grid-template-columns: 1fr 1fr;
            }
            
            .orders-container, .products-container {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 576px) {
            .stats-container {
                grid-template-columns: 1fr;
            }
            
            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <nav class="navbar">
        <div class="logo">
            <div class="logo-icon">E</div>
            <span>电商运营后台</span>
        </div>
        
        <div class="nav-links">
            <a href="#" class="active">首页</a>
            <a href="#">订单管理</a>
            <a href="#">商品管理</a>
            <a href="#">客户管理</a>
            <a href="#">数据分析</a>
        </div>
        
        <div class="user-actions">
            <div class="notification">
                <i>🔔</i>
                <div class="notification-badge">3</div>
            </div>
            <div class="user-profile">
                <div class="avatar">A</div>
                <span>管理员</span>
            </div>
        </div>
    </nav>
    
    <div class="container">
        <!-- 侧边栏 -->
        <aside class="sidebar">
            <ul class="sidebar-menu">
                <li class="active">
                    <i>📊</i>
                    <span>仪表盘</span>
                </li>
                <li>
                    <i>📦</i>
                    <span>订单管理</span>
                </li>
                <li>
                    <i>🛍️</i>
                    <span>商品管理</span>
                </li>
                <li>
                    <i>👥</i>
                    <span>客户管理</span>
                </li>
                <li>
                    <i>📈</i>
                    <span>销售报告</span>
                </li>
                <li>
                    <i>⚙️</i>
                    <span>系统设置</span>
                </li>
            </ul>
        </aside>
        
        <!-- 主内容 -->
        <main class="main-content">
            <div class="page-header">
                <h1 class="page-title">仪表盘</h1>
                <button class="btn btn-primary">
                    <i>+</i> 新建商品
                </button>
            </div>
            
            <!-- 统计卡片 -->
            <div class="stats-container">
                <div class="stat-card">
                    <div class="stat-header">
                        <div class="stat-title">总订单</div>
                        <div class="stat-icon icon-orders">📦</div>
                    </div>
                    <div class="stat-value">1,248</div>
                    <div class="stat-change change-positive">
                        <i>▲</i> 12.5% 本月
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-header">
                        <div class="stat-title">总收入</div>
                        <div class="stat-icon icon-revenue">💰</div>
                    </div>
                    <div class="stat-value">¥245,680</div>
                    <div class="stat-change change-positive">
                        <i>▲</i> 8.3% 本月
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-header">
                        <div class="stat-title">新客户</div>
                        <div class="stat-icon icon-customers">👥</div>
                    </div>
                    <div class="stat-value">342</div>
                    <div class="stat-change change-positive">
                        <i>▲</i> 5.7% 本月
                    </div>
                </div>
                
                <div class="stat-card">
                    <div class="stat-header">
                        <div class="stat-title">转化率</div>
                        <div class="stat-icon icon-growth">📊</div>
                    </div>
                    <div class="stat-value">4.8%</div>
                    <div class="stat-change change-negative">
                        <i>▼</i> 1.2% 本月
                    </div>
                </div>
            </div>
            
            <!-- 订单处理卡片流 -->
            <h2 class="section-title">最新订单</h2>
            <div class="orders-container">
                <!-- 订单卡片 1 -->
                <div class="order-card">
                    <div class="order-header">
                        <div class="order-id">#ORD-001245</div>
                        <div class="order-status status-pending">待处理</div>
                    </div>
                    <div class="order-body">
                        <div class="order-customer">
                            <div class="customer-avatar">张</div>
                            <div class="customer-info">
                                <h4>张伟</h4>
                                <p>zhangwei@example.com</p>
                            </div>
                        </div>
                        <div class="order-items">
                            <div class="item">
                                <div class="item-name">无线蓝牙耳机</div>
                                <div class="item-price">¥299.00</div>
                            </div>
                            <div class="item">
                                <div class="item-name">手机保护壳</div>
                                <div class="item-price">¥59.00</div>
                            </div>
                        </div>
                    </div>
                    <div class="order-footer">
                        <div class="order-total">总计: ¥358.00</div>
                        <div class="order-actions">
                            <button class="btn btn-sm btn-outline">查看详情</button>
                            <button class="btn btn-sm btn-primary">处理</button>
                        </div>
                    </div>
                </div>
                
                <!-- 订单卡片 2 -->
                <div class="order-card">
                    <div class="order-header">
                        <div class="order-id">#ORD-001244</div>
                        <div class="order-status status-processing">处理中</div>
                    </div>
                    <div class="order-body">
                        <div class="order-customer">
                            <div class="customer-avatar">李</div>
                            <div class="customer-info">
                                <h4>李娜</h4>
                                <p>lina@example.com</p>
                            </div>
                        </div>
                        <div class="order-items">
                            <div class="item">
                                <div class="item-name">智能手表</div>
                                <div class="item-price">¥899.00</div>
                            </div>
                        </div>
                    </div>
                    <div class="order-footer">
                        <div class="order-total">总计: ¥899.00</div>
                        <div class="order-actions">
                            <button class="btn btn-sm btn-outline">查看详情</button>
                            <button class="btn btn-sm btn-primary">发货</button>
                        </div>
                    </div>
                </div>
                
                <!-- 订单卡片 3 -->
                <div class="order-card">
                    <div class="order-header">
                        <div class="order-id">#ORD-001243</div>
                        <div class="order-status status-shipped">已发货</div>
                    </div>
                    <div class="order-body">
                        <div class="order-customer">
                            <div class="customer-avatar">王</div>
                            <div class="customer-info">
                                <h4>王强</h4>
                                <p>wangqiang@example.com</p>
                            </div>
                        </div>
                        <div class="order-items">
                            <div class="item">
                                <div class="item-name">笔记本电脑</div>
                                <div class="item-price">¥5,999.00</div>
                            </div>
                            <div class="item">
                                <div class="item-name">鼠标</div>
                                <div class="item-price">¥89.00</div>
                            </div>
                        </div>
                    </div>
                    <div class="order-footer">
                        <div class="order-total">总计: ¥6,088.00</div>
                        <div class="order-actions">
                            <button class="btn btn-sm btn-outline">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 商品管理图片卡片 -->
            <h2 class="section-title">热门商品</h2>
            <div class="products-container">
                <!-- 商品卡片 1 -->
                <div class="product-card">
                    <div class="product-image">
                        <img src="https://picsum.photos/300/200?random=1" alt="商品图片">
                    </div>
                    <div class="product-info">
                        <div class="product-category">电子产品</div>
                        <h3 class="product-name">无线蓝牙耳机 高保真音质 降噪功能</h3>
                        <div class="product-price">¥299.00</div>
                        <div class="product-actions">
                            <div class="product-stock stock-normal">
                                <i>✓</i> 库存: 128
                            </div>
                            <button class="btn btn-sm btn-outline">编辑</button>
                        </div>
                    </div>
                </div>
                
                <!-- 商品卡片 2 -->
                <div class="product-card">
                    <div class="product-image">
                        <img src="https://picsum.photos/300/200?random=2" alt="商品图片">
                    </div>
                    <div class="product-info">
                        <div class="product-category">智能设备</div>
                        <h3 class="product-name">智能手表 健康监测 运动追踪</h3>
                        <div class="product-price">¥899.00</div>
                        <div class="product-actions">
                            <div class="product-stock stock-low">
                                <i>!</i> 库存: 23
                            </div>
                            <button class="btn btn-sm btn-outline">编辑</button>
                        </div>
                    </div>
                </div>
                
                <!-- 商品卡片 3 -->
                <div class="product-card">
                    <div class="product-image">
                        <img src="https://picsum.photos/300/200?random=3" alt="商品图片">
                    </div>
                    <div class="product-info">
                        <div class="product-category">家居用品</div>
                        <h3 class="product-name">空气净化器 高效过滤 静音设计</h3>
                        <div class="product-price">¥1,299.00</div>
                        <div class="product-actions">
                            <div class="product-stock stock-normal">
                                <i>✓</i> 库存: 45
                            </div>
                            <button class="btn btn-sm btn-outline">编辑</button>
                        </div>
                    </div>
                </div>
                
                <!-- 商品卡片 4 -->
                <div class="product-card">
                    <div class="product-image">
                        <img src="https://picsum.photos/300/200?random=4" alt="商品图片">
                    </div>
                    <div class="product-info">
                        <div class="product-category">服装配饰</div>
                        <h3 class="product-name">休闲运动鞋 舒适透气 轻便设计</h3>
                        <div class="product-price">¥399.00</div>
                        <div class="product-actions">
                            <div class="product-stock stock-normal">
                                <i>✓</i> 库存: 87
                            </div>
                            <button class="btn btn-sm btn-outline">编辑</button>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // 简单的交互功能
        document.addEventListener('DOMContentLoaded', function() {
            // 侧边栏菜单点击效果
            const sidebarItems = document.querySelectorAll('.sidebar-menu li');
            sidebarItems.forEach(item => {
                item.addEventListener('click', function() {
                    sidebarItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 顶部导航菜单点击效果
            const navLinks = document.querySelectorAll('.nav-links a');
            navLinks.forEach(link => {
                link.addEventListener('click', function(e) {
                    e.preventDefault();
                    navLinks.forEach(l => l.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 订单处理按钮点击效果
            const processButtons = document.querySelectorAll('.btn-primary');
            processButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const orderCard = this.closest('.order-card');
                    const statusElement = orderCard.querySelector('.order-status');
                    
                    if (statusElement.classList.contains('status-pending')) {
                        statusElement.textContent = '处理中';
                        statusElement.className = 'order-status status-processing';
                    } else if (statusElement.classList.contains('status-processing')) {
                        statusElement.textContent = '已发货';
                        statusElement.className = 'order-status status-shipped';
                        this.textContent = '查看详情';
                        this.classList.remove('btn-primary');
                        this.classList.add('btn-outline');
                    }
                });
            });
            
            // 商品卡片悬停效果已在CSS中实现
        });
    </script>
</body>
</html>